chrome.runtime.onMessage.addListener(function(msg, _, sendResponse){
	if(msg.cmd == 'START_SELECT'){
		selectTool.startSelect(msg.params);
	}
	
	else if(msg.cmd == 'LOG'){
		console.log(msg.params);
	}
	
	else if(msg.cmd == 'SCRAPE_PAGE_START'){
		console.log('====Scrape Page Start====');
		var scraper = new Scraper(msg.params);
		var data = scraper.scrape();
		console.log(data);
		sendResponse(data);
		return true;
	}
});